package init

import (
	"fmt"
	"github.com/elastic/go-elasticsearch/v7"
)

func Es() {
	cfg := elasticsearch.Config{
		Addresses: []string{
			"http://localhost:9200",
		},
	}
	es, err := elasticsearch.NewClient(cfg)
	if err != nil {
		return
	}
	fmt.Println("es初始化成功", es)
}
